package com.example.springboot.entity;

import cn.hutool.core.annotation.Alias;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.List;

@Data
@TableName("comment")
public class Comment {

    @TableId(type=IdType.AUTO)
    private Integer id;
    private String content;
    private Integer userId;
    private Integer itemId;
    private Integer pid;
    private String time;


    @TableField(exist = false)
    private List<Comment> children;

    @TableField(exist = false)
    private String img;

    @TableField(exist = false)
    private String username;

    @TableField(exist = false)
    private String itemName;

    @TableField(exist = false)
    private String parentName;
}